<?php if(isset($_SESSION['admin'])){?>
<?php $header=$this->action('ZfcAdmin\Controller\AdminController', 'headerAction');
	  $baseUrl = $header->headerarray['baseUrl'];
?>
<html>
	<center>
		<head>
		<?php if(isset($_GET['ads_type_id']) && $_GET['ads_type_id']!=""){?>
		<h1>Edit Ads Type</h1>
		<?}else{?>
		<h1>Add Ads Type</h1>
		<?}?>
		</head><br/>
		<body>
			<form id="add_ads_form" name="add_ads_form" method="post" action="">
				Ads Type: <input type="text" name="ads_type_name" value="<? if(isset($this->ads_details->ads_type_name) && $this->ads_details->ads_type_name!=""){echo $this->ads_details->ads_type_name;}else{}?>" id="ads_type_name" placeholder="Please enter ads type name"><br/><br/>
				<a href="<? echo $baseUrl.'admin/add-types'?>">Back</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="button" id="btn_ads" name="btn_ads" value="Save" onClick="return add_ads_type();">
				<input type="hidden" id="hid_ads" name="hid_ads" value="<? if(isset($this->ads_details->ads_type_id) && $this->ads_details->ads_type_id!=""){echo $this->ads_details->ads_type_id;}else{}?>">
			</form>
		</body>
	</center>
</html>
<? } else {?>
<script>
	window.location=ADMIN_BASE_URL+'admin';
</script>
<?}?>